//获取地址栏参数，name:参数名称
function getRequest() {
    var url = window.location.search; //获取url中"?"符后的字串
    console.log(url);
    var theRequest = new Object();
    if (url.indexOf("?") != -1) {
        var str = url.substr(1);
        strs = str.split("&");
        for(var i = 0; i < strs.length; i ++) {

            theRequest[strs[i].split("=")[0]]=decodeURI(strs[i].split("=")[1]);

        }
    }
    console.log(theRequest);
    return theRequest;
}
var qrcode = new QRCode(document.getElementById("qrcode"), {
    width: 150,
    height: 150,
    colorDark: '#000000',
    colorLight: '#ffffff',
    correctLevel: QRCode.CorrectLevel.H
}); //初始化
JsBarcode("#barCode", `${contextData.userData.cardCode||getRequest().cardCode}`, {});
qrcode.makeCode(`${contextData.userData.cardCode||getRequest().cardCode}`);
